package com.hsav.kcxb.activity;

import android.app.Activity;
import android.os.Bundle;
import android.widget.ArrayAdapter;
import android.widget.Spinner;

import com.hsav.kcxb.R;

public class DomainAddActivity extends Activity {

    private Spinner mDomainSpinner;
    private Spinner mTimeSpinner;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_domain_add);
        initView();
    }

    private void initView() {
        mDomainSpinner = (Spinner)findViewById(R.id.spinner_domain);
        ArrayAdapter<CharSequence> domainAdapter = ArrayAdapter.createFromResource(this,R.array.domain_list,android.R.layout.simple_spinner_item);
        domainAdapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);
        mDomainSpinner.setAdapter(domainAdapter);

        mTimeSpinner = (Spinner)findViewById(R.id.spinner_time);
        ArrayAdapter<CharSequence> timeAdapter = ArrayAdapter.createFromResource(this,R.array.domain_time,android.R.layout.simple_spinner_item);
        domainAdapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);
        mTimeSpinner.setAdapter(timeAdapter);

    }
}
